From: Wei Liu Date: Thu, 4 Oct 2018 15:43:24 +0000 (+0100) Subject: x86: make x86_64/traps.c build with !CONFIG_PV X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3131 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=0af580cdd5809557b846022c2e790e6825127d8e;p=xen.git x86: make x86_64/traps.c build with !CONFIG_PV Provide declarations for hypercall_page_initialise_ring*_kernel, make sure DCE work as expected. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index afe539ff1d..27154f2ae2 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -354,10 +354,12 @@ void hypercall_page_initialise(struct domain *d, void *hypercall_page) memset(hypercall_page, 0xCC, PAGE_SIZE); if ( is_hvm_domain(d) ) hvm_hypercall_page_initialise(d, hypercall_page); - else if ( !is_pv_32bit_domain(d) ) + else if ( is_pv_64bit_domain(d) ) hypercall_page_initialise_ring3_kernel(hypercall_page); - else + else if ( is_pv_32bit_domain(d) ) hypercall_page_initialise_ring1_kernel(hypercall_page); + else + ASSERT_UNREACHABLE(); } /* diff --git a/xen/include/asm-x86/hypercall.h b/xen/include/asm-x86/hypercall.h index da38b7991c..7f302ecd97 100644 --- a/xen/include/asm-x86/hypercall.h +++ b/xen/include/asm-x86/hypercall.h @@ -28,9 +28,10 @@ extern const hypercall_args_t hypercall_args_table[NR_hypercalls]; #ifdef CONFIG_PV extern const hypercall_table_t pv_hypercall_table[]; void pv_hypercall(struct cpu_user_regs *regs); +#endif + void hypercall_page_initialise_ring3_kernel(void *hypercall_page); void hypercall_page_initialise_ring1_kernel(void *hypercall_page); -#endif /* * Both do_mmuext_op() and do_mmu_update():